<html>
  <head>
    <meta charset="UTF-8" />
    <title>菜鸟教程 React 实例</title>
    <script src="https://cdn.bootcss.com/react/15.4.2/react.min.js"></script>
	<script src="https://cdn.bootcss.com/react/15.4.2/react-dom.min.js"></script>
	<script src="https://cdn.bootcss.com/babel-standalone/6.22.1/babel.min.js"></script>
  </head>
  <body>
    <div id="test"></div>
    <script type="text/babel">
      var likeButton=React.createClass({
        getInitialState:function () {
          return{liked:false};
        },
        handleClick:function (ev) {
          this.setState({
            liked:!this.state.liked
          })
        },
        render:function () {
          var text=this.state.liked ? 'like':'dislike';
          return(
            <button onClick={this.handleClick}>
            doyou {text} me?
            hhhhhhhhh
            </button>
          )
        }
      })

      ReactDOM.render(
        <likeButton/>,
        document.getElementById('test')
      )
    </script>
  </body>
</html>
